package com.example.secondhandsysapi.Service;


import  com.example.secondhandsysapi.Entity.ShopCartInfo;
import com.example.secondhandsysapi.Entity.UserInfo;
import com.example.secondhandsysapi.Mapper.ShopCartInfoMapper;
import com.example.secondhandsysapi.Mapper.UserInfoMapper;
import com.example.secondhandsysapi.Vo.ShopCartGoodsInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopCartInfoServiceImpl   implements ShopCartInfoService {
    @Autowired
    private  ShopCartInfoMapper  shopCartInfoMapper;
    @Override
    public List<ShopCartGoodsInfo> getShopCartInfo1(Integer user_id) {
        return  shopCartInfoMapper .getShopCartInfo1(user_id);
    }

    @Override
    public Integer deleteShopCartGoodsInfo(Integer goods_id,Integer user_id) {
        return shopCartInfoMapper.deleteShopCartGoodsInfo (goods_id,user_id);
    }
    @Override
    public Integer getShopCartInfo(Integer user_id, Integer goods_id, Integer count) {
        Integer i =  shopCartInfoMapper.getShopCartInfo(user_id, goods_id, count);
        return 1;
    }
}
